package com.xujiang.imitationcompanypj.model;

import android.support.v4.app.Fragment;

import com.flyco.tablayout.listener.CustomTabEntity;

/**
 * 主界面导航项
 * @author liaoheng
 * @version 2016-08-12 10:42
 */
public class MainTabEntity implements CustomTabEntity {
    private String   name;
    private int      iconUnSelectId;
    private int      iconSelectId;
    //对应子界面
    private Fragment fragment;

    public Fragment getFragment() {
        return fragment;
    }

    public void setFragment(Fragment fragment) {
        this.fragment = fragment;
    }

    public MainTabEntity(String name, int iconUnSelectId, int iconSelectId, Fragment fragment) {
        this.name = name;
        this.iconUnSelectId = iconUnSelectId;
        this.iconSelectId = iconSelectId;
        this.fragment = fragment;
    }

    @Override public String getTabTitle() {
        return name;
    }

    @Override public int getTabSelectedIcon() {
        return iconSelectId;
    }

    @Override public int getTabUnselectedIcon() {
        return iconUnSelectId;
    }
}
